package dfl.bysj.controller;


import dfl.bysj.result.R;
import dfl.bysj.service.SeatStateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author DFL
 * @since 2022-05-17
 */
@CrossOrigin
@RestController
@RequestMapping("/seatState")
public class SeatStateController {
    private SeatStateService seatStateService;

    @Autowired
    public void setSeatStateService(SeatStateService seatStateService) {
        this.seatStateService = seatStateService;
    }

    @GetMapping(value = "/updateReserveState/{seaId}")
    public R updateReserveState(@PathVariable String seaId){
        seatStateService.updateReserveStateBySeaId(Integer.valueOf(seaId));
        return R.ok();
    }

}

